﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1._3DStructurePoint
{
     static class DistancePts
    {
       public static double DistanceBetweenPts(Point3D first, Point3D second)
        {
           // return 1;  //return Math.Sqrt(((first.X - second.X) * (first.X - second.X)) + ((first.Y - second.Y) * (first.Y - second.Y)) + ((first.Z - second.Z) * (first.Z - second.Z)));
            return Math.Sqrt(((first.CoordX - second.CoordX) * (first.CoordX - second.CoordX)) + ((first.CoordY - second.CoordY) * (first.CoordY - second.CoordY)) 
                + ((first.CoordZ - second.CoordZ) * (first.CoordZ - second.CoordZ)));
        }
    }
}
